import axios from "axios";

export const createTask = async (task) => {
    try {
        const response = await axios.post(
            "http://localhost:65520/tasks/createTask",
            task,
            {
                headers: {
                    "Content-Type": "application/json",
                },
            }
        );
        return response;
    } catch (error) {
        return {
            status: 1001,
            msg: "数据库不存在",
        };
    }
};
